capture log close master
log using suic-econ-master, name(master) replace text

//  program:    suic-econ-master.do
//  task:		economic downturns and suicide mortality master .do file
//  project:    economic downturns and suicide
//  author:     sam harper \ 20feb2015

/* 
This program replicates the analyses presented in Harper S, Charters TJ, 
Strumpf EC, Galea S, Nandi A. Economic downturns and suicide mortality in 
the United States: Observational study. Int J Epidemiology, 2015

Each .do file generates output datasets with parameter estimates and
standard errors. Thus, the last .do file for reproducing Figure 3
depends on having run all of the prior analyses
*/



/* 	Provides the crude number of suicides and rates by demographic group in
	Appendix Table 1. Also estimates crude and adjusted Poisson models in 
	Table 1. */
do suic-econ-a1-femodels.do

/* 	Estimates crude and adjusted Poisson models for each demographic group
	except for education. Estimates are listed in Appendix Table 2 but also 
	appear in Figure 3 */
do suic-econ-a2-demog.do


/* 	Estimates crude and adjusted Poisson models using the CPS data and
	restricting to the years 1994-2010. Estimate appears in Figure 3 
	as 1994-2010 Overall */
do suic-econ-a3-1994.do


/* 	Estimates crude and adjusted Poisson models using the CPS data by
	education group for 1994-2010. Estimates appear in Figure 3 
	and in Appendix Table 2 */
do suic-econ-a4-educ.do


/* 	Estimates crude and adjusted Poisson models using the CPS data by
	education group for 1994-2010, restricted to working ages (25-64).
	Estimates appear in Figure 3 */
do suic-econ-a4-educwa.do


/*	Crude and adjusted Poisson models using unemployment rate as exposure. 
	Estimates are in Table 3. */
do suic-econ-a5-unemp.do


/*	Crude and adjusted Poisson models using cancer as outcome. 
	Estimates are in Table 3. */
do suic-econ-a6-cancer.do


/*	Sensitivity analyses reported in Table 2 */
do suic-econ-a7-sens.do


/*	Sensitivity analyses by period of observation (Table 2) */
do suic-econ-a8-period.do


/*	Figure 3 */
do suic-econ-fig3.do

log close master
exit
